build: Ensure that Linux builds use Python 3.10 ABI#304
build: Ensure that Linux builds use Python 3.10 ABI#304Oliver Borchert (borchero) merged 1 commit intoQuantco:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #304 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 56 56
Lines 3218 3218
=========================================
Hits 3218 3218 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the GitHub Actions build workflow to ensure Linux wheels are built as cp310-abi3 (matching the project’s requires-python >=3.10 / pyo3 abi3 configuration), so Linux users can install from wheels without needing Rust.
Changes:
- Add
-i python3.10tomaturininvocation for Linux wheel builds (x86_64 and aarch64). - Parameterize
maturinarguments via the matrix to keep non-Linux builds unchanged.
|
On macOS and Windows, the build runs natively on the runner, so On Linux with I've simplified the approach: now |
The Linux wheels were being built as cp38-cp38 instead of cp310-abi3 because the manylinux Docker container doesn't have access to the Python 3.10 interpreter set up by actions/setup-python. Pass `-i python3.10` to maturin for all builds and remove the now unnecessary actions/setup-python step. Fixes Quantco#303 --- This PR was created with assistance from Claude Code (AI). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4bc36cd to
045fd44
Compare
Oliver Borchert (borchero)
left a comment
There was a problem hiding this comment.
Thanks, looks good. Please don't copy-paste Claude answers in conversations here though 😅
|
Yes sorry, i was trying more and more things recently with this tools and here I asked him to answer directly in the issue. A least I thought he will sign... |
Summary
cp38-cp38instead ofcp310-abi3-i python3.10to maturin for Linux builds to ensure abi3 wheels are producedRoot Cause
The
actions/setup-pythonaction sets up Python 3.10 on the host runner, but this has no effect inside the manylinux Docker container used for Linux builds. The manylinux2014 container's default Python is 3.8, causing maturin to build non-abi3 wheels.From the maturin-action README:
Test plan
cp310-abi3-manylinux*instead ofcp38-cp38-manylinux*Fixes #303
This PR was created with assistance from Claude Code (AI).
🤖 Generated with Claude Code